package ar.edu.unicen.exa.isistan.archassis.ia.api;

import java.util.ArrayList;
import java.util.List;

import ar.edu.unicen.exa.isistan.archassis.ia.api.db.JavaClass;

public class EvalResult {
	//private Map<JavaClass, JavaClassEvalResult> javaClassEvalResultList;
	private JavaClassCollector javaClassEvalResultList;
	private List<ICaseSummaryData> listCasesEvalResultList;
	private SummaryAmountData summaryAmountData;
	
	public EvalResult() {
		javaClassEvalResultList = new JavaClassCollector(0.2f, 0.5f);//HashMap<JavaClass, JavaClassEvalResult>();
		listCasesEvalResultList = new ArrayList<ICaseSummaryData>();
		summaryAmountData = new SummaryAmountData();
		
	}
	/**
	 * Retorna el {@link JavaClassEvalResult} correspondiente al {@link JavaClass}
	 * dado.
	 * 
	 * @param javaClass
	 * @return
	 */
	public JavaClassEvalResult getJavaClassEvalResult(JavaClass javaClass) {
		JavaClassEvalResult javaClassEvalResult = javaClassEvalResultList.get(javaClass);
		if (javaClassEvalResult == null) {
			javaClassEvalResult = new JavaClassEvalResult(javaClass);
			javaClassEvalResultList.put(javaClass, javaClassEvalResult);
		}
		return javaClassEvalResult;
	}

	/**
	 * Agrega el {@link ListCasesEvalResult} a la lista de resultados.
	 * @param listCasesEvalResult
	 */
	public void add(ListCasesEvalResult listCasesEvalResult) {
		listCasesEvalResultList.add(listCasesEvalResult);
	}

	public JavaClassCollector getJavaClassCollector() {
		return javaClassEvalResultList;
	}
	
	public List<ICaseSummaryData> getCaseSummaryDataList() {
		return listCasesEvalResultList;
	}
	public SummaryAmountData getSummaryAmountData() {
		return summaryAmountData;
	}
	
	
}
